Sift4

class Sift4(maxOffset: Int = DEFAULT_MAX_OFFSET) : StringDistance(source)

Implements the Sift4 distance (Siderite, 2014) between strings.

Note: this algorithm is asymmetric. This means that \(distance(X, Y) \not\equiv distance(Y, X)\). This is one of the artifacts of the linear nature of the algorithm.

References

Costin [Siderite], M. (2014-11-10). Super fast and accurate string distance algorithm: Sift4. https://siderite.dev/blog/super-fast-and-accurate-string-distance.html

Author

Thibault Debatty, solonovamax

Constructors

Link copied to clipboard
constructor(maxOffset: Int = DEFAULT_MAX_OFFSET)

Functions

Link copied to clipboard
open override fun distance(s1: String, s2: String): Double

Computes the Sift4 distance of two strings.